package com.example.mapper;

import com.example.pojo.entity.JobIntention;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.data.annotation.Id;

import java.util.List;

/**
 * 本文来演示:
 *
 * @author 赵建云
 * @create 2023/10/5
 */
public interface JobIntentionMapper {
    @Select("select js_id from job_intention where position =#{value} or profession=#{value}")
    List<Integer> searchByWord(String search);
    @Select("select position from job_intention where js_id=#{value}")
    List<String> searchHope(Integer jsId);

    int updateHope(JobIntention jobIntention);
    @Insert("insert into job_intention(js_id, position, profession, city, pay_floor, pay_upper) value(#{jsId},#{position},#{profession},#{city},#{payFloor},#{payUpper})")
    int saveHope(JobIntention jobIntention);
    @Select("select * from job_intention where js_id=#{jsId}")
    List<JobIntention> findHopes(Integer jsId);
}
